import request from '@/utils/request'

// 获取负责人简单列表
export const getSimple = () => request.get('/sys/user/simple')

// 获取员工列表
export const getEmployess = (params) => request.get('/sys/user', { params })

// 添加员工
export const addEmployess = (data) => request.post('/sys/user', data)

// 删除员工
export const delEmployess = (id) => request.delete(`/sys/user/${id}`)

// 批量导入员工
export const importEmployees = (data) => request.post('/sys/user/batch', data)

// 保存员工基本信息
export const saveUserDetailById = (data) => request.put(`/sys/user/${data.id}`, data)

// 获取员工岗位信息
export const getJobDetail = (id) => request.get(`/employees/${id}/jobs`)

// 给员工分配角色
export const assignRoles = (data) => request.put('/sys/user/assignRoles', data)
